<template>
	<view class="body_content">
		<view class="content-center">
			<home v-if="pageCur=='home'" @open="getData"></home>
			<query v-if="pageCur=='query'" ref='query'></query>
			<wating v-if="pageCur=='wating'" ref='wating' :data='select'></wating>
		</view>
		
		<view class="menu-bar">
			<view class="cu-bar tabbar bg-white">
				<view class="action" @click="navChange" data-cur='home'>
					<view class="cuIcon-cu-image homeIcon">
						<image :src="'/static/Hicon/current_'+[pageCur=='home'?'active':'normal']+'_home.png'"></image>
					</view>
					<view class="text-pro">首页</view>
				</view>
				<!-- <view class="action" @click="navChange" data-cur='wating'>
					<view class="cuIcon-cu-image waitingIcon">
						<image :src="'/static/Hicon/current_'+[pageCur=='wating'?'active':'normal']+'_wating.png'"></image>
					</view>
					<view class="text-pro">待办中心</view>
				</view> -->
				<view class="action" @click="navChange" data-cur='query'>
					<view class="cuIcon-cu-image queryIcon">
						<image :src="'/static/Hicon/current_'+[pageCur=='query'?'active':'normal']+'_query.png'"></image>
					</view>
					<view class="text-pro">我的</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import ls from '../../utils/local.js'
	export default {
		data() {
			return {
				pageCur: 'home',
				optionName: '--',
				userNo: '00037',
				realname:'--',
				select:{
					
				}
			}
		},
		onLoad() {
		},
		created() {
			
		},
		methods: {
			navChange(e) {
				this.pageCur = e.currentTarget.dataset.cur;
				if(this.pageCur=='wating'){
					this.select={
						status:0,
						type:'APPROVE'
					}
				}
			},
			// 子页面出发回调父页面 时间
			getData(obj){
				// console.log(obj)
				this.select=obj;
				this.pageCur='wating'
			}
			
		}
	}
</script>

<style lang="scss">
	.body_content {
		display: block;
		position: relative;
		height: auto;
		padding: 0 0;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		padding-bottom: 98rpx;
		box-sizing: border-box;
		overflow: hidden;
		min-height: 100%;

		.content-center {
			width: 100%;
			height: 100%;
			position: relative;
			overflow: scroll;
		}

		.menu-bar {
			width: 100%;
			height: 96rpx;
			// background:rgba(255,255,255,1);
			position: fixed;
			bottom: 0px;
			right: 0;
			left: 0px;
			z-index: 10;
			border-top: 2rpx solid #eee;
		}
	}

	.homeIcon image {
		width: 38rpx !important;
		height: 42rpx !important;
	}

	.waitingIcon image {
		width: 44rpx !important;
		height: 42rpx !important;
	}

	.queryIcon image {
		width: 40rpx !important;
		height: 40rpx !important;
	}

	.text-pro {
		color: rgba(153, 153, 153, 1);
	}
</style>
